<template>
	<div>
		
		
		<div class="smp-search smp_panel">
			
			<div class="smp_panel_header" >
				<div class="smp_panel_pre"></div>
				<div class="smp_panel_title">工单详情</div>
			</div>
			<div class="smp_panel_body" >
		<processBase :row="row"></processBase>
		<div class="innerTabs">
			<el-tabs >
				<el-tab-pane label="工单信息">
					
					<processDetails  ref="processDetails" :row="row"></processDetails>
				
				</el-tab-pane>
				<el-tab-pane label="流程信息">
						<processView :row="row"></processView>
				</el-tab-pane>
			</el-tabs>
		</div>
	</div>
	</div>
	</div>
</template>

<script>
	"use strict";
	import {
		examine
	} from '@/api/process.js';
	
	import processBase from '../processCommon/processBase.vue'
	import processView from '../processCommon/processView.vue'
	import processDetails from '../processCommon/processDetails.vue';
	// import {selectAllByApplyId} from '@/api/demand.js';
	// import demandDetails from '../demandDetails'
	// import demandDetails from '@/view/demandDetails'
	export default {
		data() {
			return {
				row: {},
				form: {
					taskId:'',
					developmentUserId: "",
					status: "",
					resultCode: "",
					resultMessage: "",
				},
				
			};
		},
		
		components: {
			processBase,
			processView,
			processDetails
		},
		created() {
			
			this.row = this.$route.query;
			this.form.taskId = this.row.taskId;
			this.row.sid=this.row.id;
			this.row.processInstanceId=this.row.processId;
			
			// this.applyID='20232431000000012';
			// this.getList();
			//this.getNum();
		},
		methods: {
			onSubmit() {
				this.form.status="2";
				examine(this.form).then(response => {
						if(response.data.code == "0000"){
							this.$message.success(response.data.message);
						}else{
							this.$message.error(response.data.message);
						}
						
						
					}).catch(error => {
						this.$message.error(error.message);
					});
			},
			
			onReject() {
				this.form.status="3";
				examine(this.form).then(response => {
						if(response.data.code == "0000"){
							this.$message.success(response.data.message);
						}else{
							this.$message.error(response.data.message);
						}
						
						
					}).catch(error => {
						this.$message.error(error.message);
					});
			},
		}
	};
</script>

<style scoped >
	.detailsTitle {
		color: black;
		font-size: 18px;
		text-align: left;
		margin-top: 10px;
		margin-left: 20px;
		margin-bottom: 10PX;
		border-left: 3px solid #090;
		line-height: 24px;
		padding-left: 10px;
		color: #57595d;
	}

	.serviceInfo1 {
		margin-left: 20px;
	} 
	 
	
	.serviceInfo {
		text-align: left;
		margin-left: 40px;
	} 

	.serviceInfo span {
		line-height: 30px;
		text-align: left;
		color: #606266;
		font-size: 14px;
	} 
	
	.el-divider--horizontal {
		margin: 12px 0;
		;
	}
	
	.smp-result{
		text-align: left;
		margin-left: 0px;
	}
	
</style>
